import {defineConfig} from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
    plugins: [react()],
    server: {
        port: 10010,
        proxy: {
            '/api': {
                target: 'http://localhost:8080', // Spring Boot 后端端口
                changeOrigin: true,
                rewrite: path => path.replace(/^\/api/, ''), // 代理到 /xiaoyun/chat
            },
        },
    },
});
